import React, { memo } from "react";
import propType from "prop-types";


/**
 * 登录ICON
 * @param {prop对象} props position description onClick
 */
function LoginIcon(props) {
  // icon description
  const { position, desc, handldClick } = props;
  // console.log('position description ---->', position, description)
  return (
    <span
      style={{
        display: "flex",
        width: "149px",
        marginTop: "19px",
        lineHeight: "38px",
      }}
      onClick={handldClick}
    >
      <i
        className="theme-logo"
        style={{ width: "38px", height: "38px", backgroundPosition: position }}
      ></i>
      <em style={{ marginLeft: "14px" }}>{desc}</em>
    </span>
  );
}

LoginIcon.propType = {
  position: propType.string.isRequired,
  desc: propType.string.isRequired,
  onClick: propType.func,
};

LoginIcon.defaultProptype = {
  position: "-150px -670px",
  desc: "deault",
};

export default memo(LoginIcon);
